package com.dkd.manage.controller;

import com.dkd.common.annotation.Anonymous;
import com.dkd.common.core.domain.AjaxResult;
import com.dkd.framework.websocket.WebSocketService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wuJiaWei
 * @version 1.0
 */
@Anonymous
@RestController
@RequestMapping("/WebSocket/demo")
public class WebSocket {
    @GetMapping
    public AjaxResult demo() {
        WebSocketService.sendMessage("admin","hello a 树哥");
        WebSocketService.sendMessage("13811259343","hello a 树哥");
        return AjaxResult.success("success");
    }
}
